package com.whut.model;

import com.whut.mapper.ContracttaskprojectMapper;

import javax.annotation.Resource;

public class MunicipalSafetyInspection {

    @Resource
    private String third_account;
    private String projId;
    private String inspectionPlanName;
    private String inspectionTime;
    private String inspectionMan;
    private String troubleCode;
    private Integer hiddenType;
    private Double hiddenScope;
    private Integer checkStatus;
    private Integer hiddenNumber;
    private String troubleCentent;
    private Integer inspectionPlanNo;
    private String troubleImgPath;
    private String buildingUnitSignPath;
    private String constructionUnitSignPath;
    private String supervisorUnitSignPath;
    private String imageProgress;
    private String inspectionRecordReportPath;
    private String inspectionRecordReportName;
    private String inspectionRecordReportAddTime;

    public String getBuildingUnitSignPath() {
        return buildingUnitSignPath;
    }

    public void setBuildingUnitSignPath(String buildingUnitSignPath) {
        this.buildingUnitSignPath = buildingUnitSignPath;
    }

    public String getConstructionUnitSignPath() {
        return constructionUnitSignPath;
    }

    public void setConstructionUnitSignPath(String constructionUnitSignPath) {
        this.constructionUnitSignPath = constructionUnitSignPath;
    }

    public String getSupervisorUnitSignPath() {
        return supervisorUnitSignPath;
    }

    public void setSupervisorUnitSignPath(String supervisorUnitSignPath) {
        this.supervisorUnitSignPath = supervisorUnitSignPath;
    }

    public String getImageProgress() {
        return imageProgress;
    }

    public void setImageProgress(String imageProgress) {
        this.imageProgress = imageProgress;
    }

    public String getInspectionRecordReportPath() {
        return inspectionRecordReportPath;
    }

    public void setInspectionRecordReportPath(String inspectionRecordReportPath) {
        this.inspectionRecordReportPath = inspectionRecordReportPath;
    }

    public String getInspectionRecordReportName() {
        return inspectionRecordReportName;
    }

    public void setInspectionRecordReportName(String inspectionRecordReportName) {
        this.inspectionRecordReportName = inspectionRecordReportName;
    }

    public String getInspectionRecordReportAddTime() {
        return inspectionRecordReportAddTime;
    }

    public void setInspectionRecordReportAddTime(String inspectionRecordReportAddTime) {
        this.inspectionRecordReportAddTime = inspectionRecordReportAddTime;
    }

    public String getTroubleImgPath() {
        return troubleImgPath;
    }

    public void setTroubleImgPath(String troubleImgPath) {
        this.troubleImgPath = troubleImgPath;
    }

    public Integer getInspectionPlanNo() {
        return inspectionPlanNo;
    }

    public void setInspectionPlanNo(Integer inspectionPlanNo) {
        this.inspectionPlanNo = inspectionPlanNo;
    }

    public String getThird_account() {
        return third_account;
    }

    public void setThird_account(String third_account) {
        this.third_account = third_account;
    }

    public String getProjId() {
        return projId;
    }

    public void setProjId(String projectCode){
//        ContractTaskProject ctp = contracttaskprojectMapper.getProjectInfoByProjectId(projectId);
//        String projectCode = ctp.getprojectCode();
        this.projId = projectCode;
    }

    public String getInspectionPlanName() {
        return inspectionPlanName;
    }

    public void setInspectionPlanName(String inspectionPlanName) {
        this.inspectionPlanName = inspectionPlanName;
    }

    public String getInspectionTime() {
        return inspectionTime;
    }

    public void setInspectionTime(String inspectionTime) {
        this.inspectionTime = inspectionTime;
    }

    public String getInspectionMan() {
        return inspectionMan;
    }

    public void setInspectionMan(String inspectionMan) {
        this.inspectionMan = inspectionMan;
    }

    public String getTroubleCode() {
        return troubleCode;
    }

    public void setTroubleCode(String troubleCode) {
        this.troubleCode = troubleCode;
    }


    public void setHiddenScope(String problemQua){
            Double hiddenScope = 0.0;
            switch (problemQua){
                case "部分（5%－20%]" : hiddenScope = 1.0 ; break;
                case "部分[20%-50%）" : hiddenScope = 1.5 ; break;
                case "普遍（50%以上）" : hiddenScope = 2.0 ; break;
       }
        this.hiddenScope = hiddenScope;
    }

    public Integer getHiddenType() {
        return hiddenType;
    }

    public void setHiddenType(Integer hiddenType) {
        if (hiddenType ==null)this.hiddenType = 0;
        else this.hiddenType = hiddenType;
    }

    public Double getHiddenScope() {
        return hiddenScope;
    }

    public void setHiddenScope(Double hiddenScope) {
        this.hiddenScope = hiddenScope;
    }

    public Integer getCheckStatus() {
        return checkStatus;
    }

    public void setCheckStatus(Integer checkStatus) {
        this.checkStatus = checkStatus;
    }

    public Integer getHiddenNumber() {
        return hiddenNumber;
    }

    public void setHiddenNumber(Integer hiddenNumber) {
        this.hiddenNumber = hiddenNumber;
    }

    public String getTroubleCentent() {
        return troubleCentent;
    }

    public void setTroubleCentent(String troubleCentent) {
        this.troubleCentent = troubleCentent;
    }

    public void setTroubleCentent(String remark, String suggestion) {
        String troubleCentent = "";
        if (remark != null) troubleCentent = remark;
        else troubleCentent = suggestion;
        this.troubleCentent = troubleCentent;
    }
}
